package com.itech.stocks;
public class Stock {
	public static final String SYMBOL = "symbol";
	public static final String COMPANY = "company";
	public static final String EXPIRY_DATE = "expiryDate";
	public static final String FNO_TYPE = "fnoType";
	public static final String STRIKE_PRICE = "strikePrice";
	public static final Object INDEX_TYPE = "indexType";

	enum Type {
		EQUITY,
		FNO
	}

	enum IndexType {
		EQUITY,
		INDEX
	}
	private String stockId;
	private StockPrice stockPrice;
	private String symbol;
	private String companyName;
	private Type type;
	private String expiryDate;
	private String fnoType;
	private String strikePrice;
	private IndexType indexType;

	public Stock() {

	}

	public Stock(String companyName,String symbol,
			String expiryDate, String fnoType,
			String strikePrice, Type type, IndexType indexType) {
		this.companyName = companyName;
		this.expiryDate = expiryDate;
		this.fnoType = fnoType;
		this.strikePrice = strikePrice;
		this.symbol = symbol;
		this.type = type;
		this.setIndexType(indexType);
	}

	public String getSymbol() {
		return symbol;
	}
	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}
	public String getCompanyName() {
		return companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	public Type getType() {
		return type;
	}
	public void setType(Type type) {
		this.type = type;
	}
	public String getExpiryDate() {
		return expiryDate;
	}
	public void setExpiryDate(String expiryDate) {
		this.expiryDate = expiryDate;
	}
	public String getFnoType() {
		return fnoType;
	}
	public void setFnoType(String fnoType) {
		this.fnoType = fnoType;
	}
	public String getStrikePrice() {
		return strikePrice;
	}
	public void setStrikePrice(String strikePrice) {
		this.strikePrice = strikePrice;
	}

	public String getStockId() {
		return stockId;
	}

	public void setStockId(String stockId) {
		this.stockId = stockId;
	}

	public StockPrice getStockPrice() {
		return stockPrice;
	}

	public void setStockPrice(StockPrice stockPrice) {
		this.stockPrice = stockPrice;
	}

	@Override
	public String toString() {
		return "StockId-" + getStockId() + "," + getStockPrice();
	}

	public void setIndexType(IndexType indexType) {
		this.indexType = indexType;
	}

	public IndexType getIndexType() {
		return indexType;
	}

}
